home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Graphic Gems I, II & III (C_C++) / Graphics Gems C Code.sea / GemsII / radiosity / draw.c next >
Text File  |  1992-06-16  |  1KB  |  45 lines

  1. /*****************************************************************************
  2. *    draw.c
  3. *
  4. *    This is a skeleton polygon drawing program
  5. *
  6. *     Copyright (C) 1990-1991 Apple Computer, Inc.
  7. *     All rights reserved.
  8. *
  9. *    8/27/1991 S. Eric Chen    
  10. ******************************************************************************/
  11. #include "rad.h"
  12.  
  13. void BeginDraw(TView *view, unsigned long color)
  14. {
  15.     /* first time this view is drawn */
  16.     if (view->wid==0)
  17.     {
  18.         /* open a new window if you want to display it on the screen */
  19.         /* assign the window id or pointer to view->wid */
  20.         /* the window id cannot be zero */
  21.         /* do all the necessary initialization here too */
  22.     }
  23.     
  24.     /* make view->wid the current window */
  25.     
  26.     /* set up view transformation from the parameters in view */
  27.     
  28.     /* clear the frame buffer with color */
  29. }
  30.  
  31. void DrawPolygon(int nPts, TPoint3f *pts, TVector3f* n, unsigned long color)
  32. {
  33.     /* draw a polygon with the given color */
  34.     /* buffer the polygon if you are drawing in a display list mode */
  35. }
  36.  
  37. void EndDraw()
  38. {
  39.     /* finish the drawing of all polygons */
  40.     /* display the contents of view->buffer to the current window if necessary */
  41.  
  42. }
  43.  
  44.  
  45.